﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="AllAccount.aspx.cs" Inherits="Admin_AllAcount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <!--  start page-heading -->
    <div id="page-heading">
        <h1>
            View All Account</h1>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start table-content  -->
                    <div id="table-content">
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
                                <HeaderTemplate>
                                    <tr>
                                        <th class="table-header-check">
                                            <asp:CheckBox ID="checkall" onclick='CheckAll(this)' runat="server" />
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Login Name</a>
                                        </th>
                                        <th class="table-header-repeat line-left minwidth-1">
                                            <a href="">Full Name</a></th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Email</a></th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Address</a></th>
                                        <th class="table-header-repeat line-left">
                                            <a href="">Tel</a></th>
                                        <th class="table-header-options line-left">
                                            <a href="">Options</a></th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr class="alternate-row" id="tr" runat="server">
                                        <td align="center">
                                            <asp:CheckBox runat="server" ID="ckbDelete" />
                                            <asp:HiddenField ID="hidID" runat="server" />
                                        </td>
                                        <td>  <a href="AddAccount.aspx?id=<%#DataBinder.Eval(Container.DataItem,"UserId")%>">
                                            <%# Server.HtmlEncode(Convert.ToString(DataBinder.Eval(Container.DataItem, "UserName")))%></a>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblFullname" runat="server">
                        <%# DataBinder.Eval(Container.DataItem, "Fullname")%>
                                            </asp:Label></td>
                                        <td>
                                          
                                                <asp:Label ID="lblEmail" runat="server">
                         <%# DataBinder.Eval(Container.DataItem, "Email")%>
                                                </asp:Label></td>
                                        <td>
                                            <asp:Label ID="lblAddress" runat="server">
                        <%# DataBinder.Eval(Container.DataItem, "Address")%>
                                            </asp:Label></td>
                                        <td>
                                           
                                                <asp:Label ID="lblTel" runat="server">
                        <%# DataBinder.Eval(Container.DataItem, "Tel")%></asp:Label></td>
                                        <td class="options-width">
                                            <a href="AddAccount.aspx?id=<%#DataBinder.Eval(Container.DataItem,"UserId")%>" title="Edit" class="icon-1 info-tooltip"></a>
                                             <asp:LinkButton CssClass="icon-2 info-tooltip" ID="lndelete" OnClientClick="javascript: return confirm('Bạn có chắc là muốn xóa dòng này?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false" ToolTip="Delete"></asp:LinkButton>
                                           <%-- <a href="" title="Delete"
                                                class="icon-2 info-tooltip"></a>--%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <!--  start actions-box ............................................... -->
                    <div id="actions-box">
                        <a href="" class="action-slider"></a>
                        <div id="actions-box-slider">
                            <a href="AddAccount.aspx" class="action-edit">Add</a>
                            <asp:LinkButton CssClass="action-delete" ID="lndelete" OnClientClick="javascript: return confirm('Bạn có chắc là muốn xóa dòng này?');"
                                runat="server" OnClick="lndelete_Click" CausesValidation="false">Delete</asp:LinkButton>
                            <%-- <a href="" class="action-delete">
                             
                             Delete</a>--%>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <!-- end actions-box........... -->
                    <!--  start paging..................................................... -->
                    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                        <tr>
                            <td>
                                <a href="" class="page-far-left"></a><a href="" class="page-left"></a>
                                <div id="page-info">
                                    Page <strong>1</strong> / 
                                    <asp:Literal ID="ltrNum" runat="server"></asp:Literal></div>
                                <a href="" class="page-right"></a><a href="" class="page-far-right"></a>
                            </td>
                           
                        </tr>
                    </table>
                    <!--  end paging................ -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
       function CheckAll(obj)
        {
            // find any item not check
            var countUncheck = 0;
            var checkAll = true;
            var checkList = document.getElementsByTagName("input");
            if(!obj.checked)
            checkAll = false;
            for(var i = 0 ; i < checkList.length ; i++)
            { 
                if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("ckbDelete") >= 0 )
                {
                checkList[i].checked = checkAll;
                }
            } 
    }
      
    </script>

</asp:Content>
